cmake_minimum_required(VERSION 3.25)
project(TemplateLearn LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Release)
    message(STATUS "set default build type: ${CMAKE_BUILD_TYPE}")
endif()
    
# 静态库输出目录
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/lib)
# 动态库输出目录
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/bin)
# 可执行文件输出目录
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/bin)

set(RESOURCE_DIR "${PROJECT_SOURCE_DIR}/resource")

add_subdirectory(${PROJECT_SOURCE_DIR}/3rd)
add_subdirectory(${PROJECT_SOURCE_DIR}/src)
